package com.livesource.client.web.liveSource;

import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * 
 * @UserInterface
 */
public class BlogArchiveList extends VerticalPanel {

	public BlogArchiveList() {

		VerticalPanel vpBlog = new VerticalPanel();

		vpBlog.setWidth("350px");

		vpBlog.setSpacing(15);

		vpBlog.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);

		vpBlog.add(blogTitle());

		showNewsEnglish(vpBlog);

		this.add(vpBlog);
	}

	private HTML blogTitle() {

		String blogLink = "http://golivesource.blogspot.com/";

		HTML htmlBlogTitle = new HTML("<font color=orange><b>*** </b></font>"
				+ " <font color=blue><b>LiveSource BLOG</b></font>"
				+ "<font color=orange><b> ***</b></font><br>" + "<a href='"
				+ blogLink + "' target='_blank'>" + blogLink + "</a><br><br>");

		return htmlBlogTitle;
	}

	private void showNewsEnglish(VerticalPanel vpNews) {

		HTML labelNews1 = new HTML(
				"<a href='http://goLiveSource.blogspot.com/2011/08/lean-code.html'"
						+ " target='_blank'>The Lean Code</a>");

		vpNews.add(labelNews1);

		HTML labelNews2 = new HTML(
				"<a href='http://golivesource.blogspot.com/2011/06/defining-your-minimum-viable-product.html'"
						+ " target='_blank'>Defining your Minimum Viable Product</a>");

		vpNews.add(labelNews2);

		HTML labelNews7 = new HTML(
				"<a href='http://golivesource.blogspot.com/2011/03/being-agile-is-not-easy.html'"
						+ " target='_blank'>Being Agile is not Easy</a>");

		vpNews.add(labelNews7);

		HTML labelNews5 = new HTML(
				"<a href='http://golivesource.blogspot.com/2011/02/ubiquitous-language-inside-source-code.html'"
						+ " target='_blank'>Ubiquitous Language inside the Source Code</a>");

		vpNews.add(labelNews5);

		HTML labelNews6 = new HTML(
				"<a href='http://golivesource.blogspot.com/2011/02/why-some-programmers-don-like.html'"
						+ " target='_blank'>Why some programmers don't like transparency</a>");

		vpNews.add(labelNews6);

	}
}
